<p>news works!</p>

<br>
<br>

<a [routerLink]="[ '/newscontent' ]">新闻详情页面</a>

<!-- <h2>get传值</h2> -->

<!-- <ul>
  <li *ngFor="let item of list; let key=index"> -->
    <!-- 在angular里面get传值不能这样写 -->
    <!-- <a href="http://newscontent?aid=123">{{key}} -- {{item}}</a> -->

    <!-- <a href="#">{{key}} == {{item}}</a> -->

    <!-- <a [routerLink]="[ '/newscontent']" [queryParams]="{aid: key}">{{key}}--{{item}}</a>
  </li>
</ul> -->

<h2>动态路由</h2>

<ul>
  <li *ngFor="let item of list; let key=index;">
    <!-- 在angular里面get传值不能这样写 -->
    <!-- <a href="http://newscontent?aid=123">{{key}} -- {{item}}</a> -->

    <!-- <a href="#">{{key}} == {{item}}</a> -->

    <a [routerLink]="[ '/newscontent/', key]">{{key}}--{{item}}</a>
  </li>
</ul>
